<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位机制</title>
    <!--浮动-->
    <!--文本流
         1. 元素自左上向右下自然排列
         2. 元素分为两个基本类型： 块级元素、行内元素
    -->
    <style>

        .box {
            width: 100px;
            height: 100px;
            margin-left: 20px;
            margin-top: 20px;
            background-color: black;
            color: white;
            text-align: center;
            line-height: 100px;
        }

        .left {
            float: left;
        }

        .right {
            float: right;
        }
    </style>
</head>
<body>
<div class="left">
    <div class="right">
        <div class="box left">1</div>
        <div class="box left">2</div>
    </div>
    <div class="box right">3</div>
</div>
</body>
</html>